package com.lengyue.imakiba.data;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

public class Anime extends Model<Anime>{
	public static final Anime dao = new Anime();
	public List<Episode> getEpisode()
	{
		return Episode.dao.find("select * from episode where anime_id = ?", get("id"));
	}
	public List<Type> getType()
	{
		return Type.dao.find("select t.* from type t inner join anime_type at on at.type_code = t.type_code where at.anime_id = ?",get("id"));
	}
	public List<CV> getCV()
	{
		return CV.dao.find("select c.* from cv c inner join anime_cv a on a.cv_id = c.id where a.anime_id = ?",get("id"));
	}
}
